package com.cmict.data.system.controller.admin.user.vo.user;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.TableField;
import com.cmict.data.framework.excel.core.annotations.DictFormat;
import com.cmict.data.framework.excel.core.convert.DictConvert;
import com.cmict.data.framework.mybatis.core.type.JsonLongSetTypeHandler;
import com.cmict.data.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Set;

/**
 * 用户 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ExcelIgnoreUnannotated
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class UserImportExcelVO {


    @ExcelProperty("登录账号")
    private String username;

    @ExcelProperty("用户昵称")
    private String nickname;
    @ExcelProperty("部门")
    private String deptName;

    private Long deptId;

    @ExcelProperty("邮箱")
    private String email;

    @ExcelProperty("手机号码")
    private String mobile;

    @ExcelProperty(value = "用户性别", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.USER_SEX)
    private Integer sex;

    @ExcelProperty(value = "岗位")
    private String postNames;

    private Set<Long> postIds;

//    @ExcelProperty(value = "角色")
//    private String roleNames;
//
//    private Set<Long> roleIds;

    @ExcelProperty(value = "账号状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.COMMON_STATUS)
    private Integer status;

}
